package com.liujie.dhunting.utils;

import org.ethereum.util.ByteUtil;
import java.security.MessageDigest;
public class ToMD5 {
    public static String encrypt2ToMD5(String str) {
        String hexStr = "";
        try {
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            byte[] digest = md5.digest(str.getBytes("utf-8"));
            hexStr = ByteUtil.toHexString(digest);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return hexStr;
    }
}
